const express = require('express')

const app = express()

// 给app挂载一个加密规则密文串
app.set('secret','hahahahahaha')
app.use(require('cors')())
app.use(express.json())
// 可以匹配到'/uploads'   就可以访问到这个文件下的东西
app.use('/uploads',express.static(__dirname+'/uploads'))

require('./plugins/db')(app)
require('./routes/admin/index')(app)
require('./routes/web/index')(app)

app.listen(3000,()=>{
    console.log('http://localhost:3000')
})








